import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  ScrollView,
  RefreshControl,
  View,
  Image,
  Dimensions,
  TouchableOpacity,
  Alert
} from 'react-native';

import Icon from 'react-native-vector-icons/FontAwesome';

class Header extends Component {  
	constructor(props) {  
		super(props);
  	}
	
	render(){  
		var buttonLeft = {
	    	onPress: this.props.onPressLeft
	    };
	    
	    var buttonRight = {
	    	onPress: this.props.onPressRight
	    };
	    
		return (
		<View style={styles.header}>
			<TouchableOpacity {...buttonLeft}>
				<View style={styles.title} style={styles.icon_left}>
					<Icon name="chevron-left" size={18} color="#EEEEEE" />
				</View>
			</TouchableOpacity>
			<View style={styles.title}>
				<Text style={{color:"#ffffff",fontSize:16}}>Idolly测试软件</Text>
			</View>
			<TouchableOpacity {...buttonRight}>
				<View style={styles.title} style={styles.icon_right}>				
					<Icon name="question" size={18} color="#EEEEEE"/>				
				</View>
			</TouchableOpacity>
		</View>
		);
	}
}
//#efeff4
const styles = StyleSheet.create({
	header:{
		flexDirection:'row',
		height:50,
		alignItems: 'center',
    	backgroundColor: '#ff0000',
    	width:Dimensions.get('window').width
	},
	icon_left:{
		width:40,
		height:50,
		alignItems: 'center',
		justifyContent: 'center',
	},
	title:{
		flex:1,
		alignItems: 'center',
	},
	icon_right:{
		width:50,
		height:50,
		alignItems: 'center',
		justifyContent: 'center',
	}
});

module.exports = Header;